package com.ace3l.legal.backend.domain;

//import com.ace3l.manager.forms.LawFirmForm;
//import com.ace3l.manager.util.ManagerConstants;

import java.util.List;
import java.util.ArrayList;
import javax.persistence.*;
/**
 * ACE3L.COM
 * com.ace3l.manager.domain
 * This code was written by Synesthesia Consulting Services in conjunction
 * with Ace3L.com. This code is confidential and proprietary. This code is
 * copyright (C) 2008  Synesthesia Consulting Services and Ace3L.com
 * Created By: ageer
 * Date: Jun 16, 2008
 * Time: 4:11:58 PM
 */
@Entity
@Table(name = "LAWFIRM")
@org.hibernate.annotations.GenericGenerator(
    name = "hibernate-increment",
    strategy = "increment"
)
@NamedQueries({
    @NamedQuery(name="lawfirm.byusername",query="from LawFirm l where l = ?"),
    @NamedQuery(name="lawfirm.byid",query="from LawFirm l where l.user.id = ?")
})
public class LawFirm {
    @Id
    @Column(name = "USER_ID")
    private Integer id;

    @OneToOne()
    @PrimaryKeyJoinColumn(name = "USER_ID")
    private User user;


    private String lawFirmName;
    private String contactFirstName;
    private String contactLastName;
    private String firmAddress1;
    private String firmAddress2;
    private String firmCity;
    private String firmState;
    private String firmZip;
    private String contactPhone;
    private String email;
    private Boolean emailVerified;
//    private List adminNotes = new ArrayList();
    private String lawFirmStatus;

//    public void populateFromForm(LawFirmForm s, User u) {
//        this.user = u;
//        this.lawFirmName = s.getLawFirmName();
//        this.contactFirstName = s.getContactFirstName();
//        this.contactLastName = s.getContactLastName();
//        this.firmAddress1 = s.getFirmAddress1();
//        this.firmAddress2 = s.getFirmAddress2();
//        this.firmCity = s.getFirmCity();
//        this.firmState = s.getFirmState();
//        this.firmZip = s.getFirmZip();
//        this.contactPhone = s.getContactPhone();
//        this.email = s.getEmail();
//        this.emailVerified = Boolean.FALSE;
//        this.lawFirmStatus = ManagerConstants.LAWFIRM_WORKFLOW_NEW;
//
//    }
//    public Integer getId() {
//        return id;
//    }
//
//    public void setId(Integer id) {
//        this.id = id;
//    }

    public User getUser() {
        return user;
    }

    public void setUser(User user) {
        this.user = user;
        this.id = user.getId();
    }

    public String getLawFirmName() {
        return lawFirmName;
    }

    public void setLawFirmName(String lawFirmName) {
        this.lawFirmName = lawFirmName;
    }

    public String getContactFirstName() {
        return contactFirstName;
    }

    public void setContactFirstName(String contactFirstName) {
        this.contactFirstName = contactFirstName;
    }

    public String getContactLastName() {
        return contactLastName;
    }

    public void setContactLastName(String contactLastName) {
        this.contactLastName = contactLastName;
    }

    public String getContactFullName() {
        return contactFirstName + " " + contactLastName;
    }

    public String getFirmAddress1() {
        return firmAddress1;
    }

    public void setFirmAddress1(String firmAddress1) {
        this.firmAddress1 = firmAddress1;
    }

    public String getFirmAddress2() {
        return firmAddress2;
    }

    public void setFirmAddress2(String firmAddress2) {
        this.firmAddress2 = firmAddress2;
    }

    public String getFirmCity() {
        return firmCity;
    }

    public void setFirmCity(String firmCity) {
        this.firmCity = firmCity;
    }

    public String getFirmState() {
        return firmState;
    }

    public void setFirmState(String firmState) {
        this.firmState = firmState;
    }

    public String getFirmZip() {
        return firmZip;
    }

    public void setFirmZip(String firmZip) {
        this.firmZip = firmZip;
    }

    public String getContactPhone() {
        return contactPhone;
    }

    public void setContactPhone(String contactPhone) {
        this.contactPhone = contactPhone;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public Boolean getEmailVerified() {
        return emailVerified;
    }

    public void setEmailVerified(Boolean emailVerified) {
        this.emailVerified = emailVerified;
    }

//    public List getAdminNotes() {
//        return adminNotes;
//    }
//
//    public void setAdminNotes(List adminNotes) {
//        this.adminNotes = adminNotes;
//    }
//
//    public void addAdminNote(Note newNote) {
//        newNote.setUser(this.getUser());
//        newNote.setIndexId(this.getAdminNotes().size());
//        adminNotes.add(newNote);
//    }

    public String getLawFirmStatus() {
        return lawFirmStatus;
    }

    public void setLawFirmStatus(String firmStatus) {
        this.lawFirmStatus = firmStatus;
    }

    
}
